Lpe = new function(){};
Lpe.friction = true;
Lpe.hitLost = 10;
Lpe.frictionFactor = 0.01;
Lpe.turnFactor = 0.0001;

includeJS("lge/engine/physics/box.js");
includeJS("lge/engine/physics/particle.js");
includeJS("lge/engine/physics/collision.js");

Lpe.init=function(){};

Lpe.refresh = function(){
	for(var i=0; i<Lge.items.length; i++){
		if( Lge.items[i].type == 'ball'
		|| Lge.items[i].type == 'box'
		|| Lge.items[i].type == 'particle'){
			Lpe.calcForce( Lge.items[i]);
			Lpe.effectSpeed( Lge.items[i]);
		}
		Lpe.findCollision(Lge.items[i]);
	}
	for(var j=0; j<Lpe.fm.forces.length; j++){
		if(Lpe.fm.forces[j].count != 0 && --Lpe.fm.forces[j].count == 0)
			Lpe.fm.forces.splice(j,(j--)+1);
	}
};


/**************************************** LPE INITILIAZE METHODS ***********************************/

Lpe.Vector = function(x,y){
	this.x=x;
	this.y=y;
};

Lpe.Force = function(x,y, count, id){
	this.vector = new Lpe.Vector(x,y);
	this.count= count;
	this.id = id;
};
